﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Educational_School_Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>学校注册</title>
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Content.css" />
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Core.css" />
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Layout.css" />
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Dock.css" />
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Window.css" />
<link rel="stylesheet" type="text/css" href="../../Themes/Default/Css/Tabs.css" />
<script type="text/javascript" src="../../JS/mootools-1.2.4-core-yc.js"></script>
<script type="text/javascript" src="../../JS/mootools-1.2.4-more-yc.js"></script>
<!--[if IE]>
	<script type="text/javascript" src="../../JS/excanvas_r43_zip.js"></script>
<![endif]-->
<script type="text/javascript" src="../../JS/mocha.js"></script>
<script type="text/javascript" src="../../JS/mocha-plugin.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){
    window.binddingEvent=function(){
        $('btnReturn').addEvent('click',function(){
            window.location.href='Login.aspx';
        });
        $('imgSafeCode').addEvent('click',function(){
            this.set('src','../../Basic/Shared/SafeCode.aspx?'+new Date().getMilliseconds());
        });
    };
    
    window.pageInitialize=function(){
        new MochaUI.Window({
            id: 'mywindow',
            title: '学校注册信息提交',
            content: $('registerForm'),
            closable:false,
            resizable:false,
            draggable:false,
            collapsible:false,
            width: 340,
            height: 290
        });
        $('registerForm').show();
        new FormCheck('registerForm',{display:{tipsPosition:'left'},submit:false,onValidateSuccess:function(){
            MUI.showModalMessage('正在提交注册信息');
            new Request.JSON({url:'../Ajax/SchoolManage.aspx?Action=saveSchoolRegister',noCache:true,onSuccess:function(result){
                MUI.hideModalMessage();
                if(result.error)
                {
                    MUI.showModalAlert(result.msg);
                    $('imgSafeCode').fireEvent('click');
                }
                else
                {
                    MUI.showModalAlert(result.msg);
                }
	        },onFailure:function(error){
		        MUI.showModalAlert('AJAX提交表单的过程中发生未知错误。');
		        MUI.hideModalMessage();
            }}).post($('registerForm'));
        }});
    };
    
    window.pageInit=function(){
        MUI.path.plugins='../../Plugins/';
        MUI.requireAll(window.pageInitialize);
        window.binddingEvent();
    };
    
    window.pageInit();
});
</script>
<style type="text/css">
input{width:150px;}
.tableLeft{width:100px;text-align:right;}
.tableLeft2{width:80px;}
.tableFixed tr td{height:30px;line-height:30px;}
#safeCode{width:70px;}
.button{width:70px;}
#imgSafeCode{width:80px;height:22px;cursor:pointer;}
</style>
</head>
<body>
    <form id="registerForm" style="display:none;">
        <table class="tableFixed" border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="tableLeft">校名：</td>
                <td colspan="2"><input id="schoolName" name="schoolName" class="input validate['required','length[4,50]']" type="text" /></td>
            </tr>
            <tr>
                <td class="tableLeft">学校类型：</td>
                <td colspan="2"><%=selectStr %></td>
            </tr>
            <tr>
                <td class="tableLeft">法人代表姓名：</td>
                <td colspan="2"><input id="legalRepresentative" name="legalRepresentative" class="input validate['required','length[2,10]']" type="text" /></td>
            </tr>
            <tr>
                <td class="tableLeft">负责人电话：</td>
                <td colspan="2"><input id="telnumber" name="telnumber" class="input validate['required','length[2,16]',,'phone']" type="text" /></td>
            </tr>
            <tr>
                <td class="tableLeft">管理员登录ID：</td>
                <td colspan="2"><input id="loginId" name="loginId" class="input validate['required','length[4,16]']" type="text" /></td>
            </tr>
            <tr>
                <td class="tableLeft">管理员登录密码：</td>
                <td colspan="2"><input id="loginPass" name="loginPass" class="input validate['required','length[4,16]']" type="password" /></td>
            </tr>
            <tr>
                <td class="tableLeft">登录密码确认：</td>
                <td colspan="2"><input id="loginPassConfirm" name="loginPassConfirm" class="input validate['required','length[4,16]']" type="password" /></td>
            </tr>
            <tr>
                <td class="tableLeft">验证码：</td>
                <td class="tableLeft2"><input id="safeCode" name="safeCode" class="input validate['required','length[4,4]']" type="text" /></td>
                <td><img id="imgSafeCode" src="../../Basic/Shared/SafeCode.aspx" alt="验证码" /></td>
            </tr>
            <tr>
                <td colspan="3" align="center">
                    <input id="btnSubmit" class="button validate['submit']" type="button" value="提交注册" />
                    <input id="btnReturn" class="button" type="button" value="返回登录" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
